package com.strategy.game.case2;

/**
 * @ClassName: RoleTest
 * @Description:
 * @Author Fly
 * @Date 2022/12/13 16:08
 */
public class RoleTest {

    public static void main(String[] args) {
        Role daji = new Daji("妲己")
                // 将不变的保留，变化的代码提出来
                .setSkinBehavior(new RedSkin())
                .setSkillBehavior(new TianlongBabuSkill())
                .setRunBehavior(new walkWithDaintySteps());
        daji.skin();
        daji.skill();
        daji.run();

        Role role = new YingZheng("嬴政")
                .setSkinBehavior(new GoldenSkin())
                .setSkillBehavior(new BuddhaGodPalmSkill())
                .setRunBehavior(new walkWithDaintySteps());
        role.skin();
        role.skill();
        role.run();
    }
}
